package com.youku.plugins.controlbarV4.view.components
{
   import flash.display.Sprite;
   import com.youku.plugins.controlbarV4.view.interfaces.IControlBar;
   import com.youku.interfaces.ISkinChangeCompent;
   import com.youku.interfaces.IPlayerProxy;
   import flash.text.TextField;
   import flash.display.MovieClip;
   import com.youku.baseUI.BasePlayerButton;
   import flash.utils.Timer;
   import com.youku.baseUI.ButtonInfo;
   import flash.utils.Dictionary;
   import com.youku.plugins.controlbarV4.ControlBarConstant;
   import com.youku.PlayerConfig;
   import com.youku.constants.RootConstant;
   import com.youku.utils.AssetUtil;
   import com.youku.data.PlayerContext;
   import com.youku.events.PluginEvent;
   import com.youku.utils.LayoutHelper;
   import flash.geom.Point;
   import flash.events.MouseEvent;
   import com.youku.plugins.controlbarV4.view.events.ProgressBarEvent;
   import flash.events.TimerEvent;
   import com.youku.plugins.controlbarV4.view.events.SoundSliderEvent;
   import flash.events.Event;
   import com.youku.plugins.controlbarV4.view.events.InformationBarEvent;
   import flash.events.KeyboardEvent;
   import com.youku.utils.ReportUtil;
   import flash.ui.Keyboard;
   import flash.utils.getTimer;
   import com.youku.plugins.controlbarV4.view.events.VideoBarEvent;
   import com.youku.plugins.controlbarV4.view.events.SelectEvent;
   import com.youku.utils.Tweener;
   import com.youku.utils.OpenWindow;
   import flash.net.URLRequest;
   import com.youku.data.PlayerConstant;
   import com.youku.error.ErrorCode;
   import com.youku.events.PlayerControlEvent;
   import flash.system.System;
   import com.youku.conductor.ConductorState;
   import com.youku.interfaces.IPlayerData;
   import flash.display.DisplayObject;
   import com.youku.plugins.controlbarV4.ControlBarFont;
   import com.youku.skin.PartenerSkinManager;
   
   public class ControlBar extends Sprite implements IControlBar, ISkinChangeCompent
   {
      
      public function ControlBar() {
         super();
         this._isPlaying = false;
         this._holding = false;
         this._videoBarShow = true;
         this._panelHidden = false;
         this._enableVideoControl = false;
         this._fullscreen = false;
         this._autoHide = false;
         this._continuousHintShowed = false;
         this._jumpHeadShowed = false;
         this._jumpTailShowed = false;
         this._jumpedHead = false;
         this._jumpedTail = false;
         this._showNextPre = false;
         this._showQuality = false;
         this._showVoice = false;
         this._showLogo = false;
         this._showShare = false;
         this._showCaption = false;
         this._showThreed = false;
         this._showRotate = false;
         this._showLoop = false;
         this._mouseTime = getTimer();
         this._itemArr = [];
         this._divSkinType = 0;
         PartenerSkinManager.push(this);
      }
      
      public static const CONTINUOUS_NOTICE_BEFORE_TIME:Number = 10;
      
      public static const JUMP_TAIL_NOTICE_BEFORE_TIME:Number = 20;
      
      private var _playerProxy:IPlayerProxy;
      
      private var _state:String = "";
      
      private var _type:String;
      
      private var _width:Number;
      
      private var _height:Number;
      
      private var _pb:ProgressBar;
      
      private var _totalTime:Number;
      
      private var _panel:Sprite;
      
      private var _upperParts:Sprite;
      
      private var _lowerParts:Sprite;
      
      private var _background:ControlBarBG;
      
      private var _timeTf:TextField;
      
      private var _sound:SoundSlider;
      
      private var _timeShower:MovieClip;
      
      private var _mouseTime:Number;
      
      private var _panelHidden:Boolean;
      
      private var _itemArr:Array;
      
      private var _playMc:MovieClip;
      
      private var _playMcFrame:String;
      
      private var _playButton:BasePlayerButton;
      
      private var _pauseButton:BasePlayerButton;
      
      private var _teleplaysButton:CommonTextButton;
      
      private var _nextButton:BasePlayerButton;
      
      private var _timeDisplayer:TimeDisplayer;
      
      private var _loopButton:BasePlayerButton;
      
      private var _rotateButton:BasePlayerButton;
      
      private var _voiceSelector:CommonTextButton;
      
      private var _qualitySelector:CommonTextButton;
      
      private var _settingButton:BasePlayerButton;
      
      private var _shareButton:BasePlayerButton;
      
      private var _fullScreenButton:BasePlayerButton;
      
      private var _normalScreenButton:BasePlayerButton;
      
      private var _captionButton:CommonTextButton;
      
      private var _threedButton:CommonTextButton;
      
      private var _logo:BasePlayerButton;
      
      private var _informationBar:InformationBar;
      
      private var _miniSound:SoundSliderMini;
      
      private var _miniPlayButton:BasePlayerButton;
      
      private var _miniPauseButton:BasePlayerButton;
      
      private var _shouldShow:Boolean = true;
      
      private var _holding:Boolean;
      
      private var _videoBarShow:Boolean;
      
      private var _enableVideoControl:Boolean;
      
      private var _fullscreen:Boolean;
      
      private var _isPlaying:Boolean;
      
      private var _showNextPre:Boolean;
      
      private var _showQuality:Boolean;
      
      private var _showLogo:Boolean;
      
      private var _showVoice:Boolean;
      
      private var _showCaption:Boolean;
      
      private var _showThreed:Boolean;
      
      private var _showRotate:Boolean;
      
      private var _showShare:Boolean;
      
      private var _showLoop:Boolean;
      
      private var _continuousHintShowed:Boolean;
      
      private var _sendHeightChanged:Boolean = false;
      
      private var _hideMode:String = "no";
      
      private var _hideHeight:int = 0;
      
      private var _autoHide:Boolean = false;
      
      private var _jumpHeadShowed:Boolean;
      
      private var _jumpTailShowed:Boolean;
      
      private var _jumpedHead:Boolean;
      
      private var _jumpedTail:Boolean;
      
      private var _backwardTimer:Timer;
      
      private var _forwardTimer:Timer;
      
      private var _lastKeyDownTime:Number;
      
      private var _draggingTime:Number;
      
      private var _buttonInfo:ButtonInfo;
      
      private var _buttonInfoDict:Dictionary;
      
      private var _buttonInfoTimer:Timer;
      
      private var _scale:Number = 1;
      
      private var _isMouseOnBar:Boolean;
      
      private var _isVolumeTipsFirstShow:Boolean;
      
      private var _lastVolume:Number = -1;
      
      private var _playPer:Number = 0;
      
      private var _isForceProgressMode:Boolean = true;
      
      private var _isMouseOnProgressBar:Boolean = false;
      
      private var _divSkinType:int;
      
      public function init(param1:IPlayerProxy) : void {
         this._playerProxy = param1;
         this._type = ControlBarConstant.CONTROLBAR_TYPE_NORMAL;
         if(this._playerProxy.rootGetData.rootWinType == "index" || this._playerProxy.rootGetData.rootWinType == "adshow")
         {
            this._type = ControlBarConstant.CONTROLBAR_TYPE_SMALL;
         }
         this._showLogo = this.shouldShowLogo();
         this._showShare = this.shouldShowShare();
         this._width = PlayerConfig.normalWidth;
         this._height = PlayerConfig.normalHeight;
         this.createItems();
         this.addEvents();
         this.setWH(this._width,this._height);
         this.registerTips();
         this._hideMode = "no";
         this._autoHide = false;
         this._hideHeight = 0;
         if(this._playerProxy.rootGetData.rootAutoHide == RootConstant.CONTROLBAR_MODE_HIDE)
         {
            this._hideMode = "yes";
            this._autoHide = true;
            this._hideHeight = 0;
         }
         else if(this._playerProxy.rootGetData.rootAutoHide == RootConstant.CONTROLBAR_MODE_HALF)
         {
            this._hideMode = "half";
            this._autoHide = true;
            this._hideHeight = this._pb.height + 8;
         }
         
         this._sendHeightChanged = true;
      }
      
      private function shouldShowLogo() : Boolean {
         if(this._playerProxy.rootGetData.rootWinType == "exterior" || !(this._playerProxy.partnerData == null) && (this._playerProxy.partnerData.status == 0 || this._playerProxy.partnerData.nobandData.status == 0))
         {
            return true;
         }
         return false;
      }
      
      private function shouldShowShare() : Boolean {
         if((PlayerConfig.partnerData) && PlayerConfig.partnerData.nobandData.status == 1)
         {
            return false;
         }
         if(this._playerProxy.rootGetData.rootWinType == "exterior")
         {
            return true;
         }
         return false;
      }
      
      private function createItems() : void {
         this._panel = new Sprite();
         this.addChild(this._panel);
         this._upperParts = new Sprite();
         this._lowerParts = new Sprite();
         this.setBackground(ControlBarConstant.BG_NORMAL_COLOR,ControlBarConstant.BG_NORMAL_LINE_COLOR,1);
         this._background.width = this._width;
         this._panel.y = this._height - this._background.height;
         this._pb = new ProgressBar();
         this._pb.init(500,10);
         this._pb.enabled = false;
         this._pb.winType = this._playerProxy.rootGetData.rootWinType;
         this._miniPlayButton = AssetUtil.getStyleButton("C_Slider_play");
         AssetUtil.restoreButtonSize(this._miniPlayButton);
         this._miniPauseButton = AssetUtil.getStyleButton("C_Slider_pause");
         AssetUtil.restoreButtonSize(this._miniPauseButton);
         this._miniSound = new SoundSliderMini();
         this._miniSound.data = 0.5;
         this._playButton = AssetUtil.getStyleButton("C_Play");
         AssetUtil.restoreButtonSize(this._playButton);
         this._pauseButton = AssetUtil.getStyleButton("C_Pause");
         AssetUtil.restoreButtonSize(this._pauseButton);
         this._playMc = AssetUtil.getAsset("C4_Play_animation") as MovieClip;
         this._teleplaysButton = new CommonTextButton();
         this._teleplaysButton.label = "选集";
         this._timeDisplayer = new TimeDisplayer();
         this._timeDisplayer.setTimeText(0,0);
         this._sound = new SoundSlider();
         this._sound.data = 0.5;
         this._voiceSelector = new CommonTextButton();
         this._voiceSelector.label = "普通话";
         this._qualitySelector = new CommonTextButton();
         this._qualitySelector.label = "flv";
         this._settingButton = AssetUtil.getStyleButton("C_SysSettings");
         AssetUtil.restoreButtonSize(this._settingButton);
         this._shareButton = AssetUtil.getStyleButton("C4_Share");
         AssetUtil.restoreButtonSize(this._shareButton);
         this._fullScreenButton = AssetUtil.getStyleButton("C_FullScreen");
         AssetUtil.restoreButtonSize(this._fullScreenButton);
         this._normalScreenButton = AssetUtil.getStyleButton("C_NonfullScreen");
         AssetUtil.restoreButtonSize(this._normalScreenButton);
         this._nextButton = AssetUtil.getStyleButton("C_Next");
         AssetUtil.restoreButtonSize(this._nextButton);
         this._loopButton = AssetUtil.getStyleButton("C_SingleRepeat");
         AssetUtil.restoreButtonSize(this._loopButton);
         this._loopButton.toggle = true;
         this._captionButton = new CommonTextButton();
         this._captionButton.label = "字幕";
         this._threedButton = new CommonTextButton();
         this._threedButton.label = "3D";
         this._rotateButton = AssetUtil.getStyleButton("C_rotate_icon");
         AssetUtil.restoreButtonSize(this._rotateButton);
         this._logo = AssetUtil.getStyleButton("C_Logo_symbol");
         AssetUtil.restoreButtonSize(this._logo);
         this._informationBar = new InformationBar();
         this._panel.addChild(this._informationBar);
         this._panel.addChild(this._lowerParts);
         this._panel.addChild(this._upperParts);
         this._panel.addChild(this._logo);
         this._upperParts.addChild(this._pb);
         this._upperParts.addChild(this._miniPauseButton);
         this._upperParts.addChild(this._miniPlayButton);
         this._upperParts.addChild(this._miniSound);
         this._lowerParts.addChild(this._playMc);
         this._lowerParts.addChild(this._playButton);
         this._lowerParts.addChild(this._pauseButton);
         this._lowerParts.addChild(this._nextButton);
         this._lowerParts.addChild(this._timeDisplayer);
         this._lowerParts.addChild(this._sound);
         this._lowerParts.addChild(this._settingButton);
         this._lowerParts.addChild(this._shareButton);
         this._lowerParts.addChild(this._voiceSelector);
         this._lowerParts.addChild(this._qualitySelector);
         this._lowerParts.addChild(this._fullScreenButton);
         this._lowerParts.addChild(this._normalScreenButton);
         this._lowerParts.addChild(this._teleplaysButton);
         this._lowerParts.addChild(this._loopButton);
         this._lowerParts.addChild(this._captionButton);
         this._lowerParts.addChild(this._threedButton);
         this._lowerParts.addChild(this._rotateButton);
         this._backwardTimer = new Timer(100);
         this._forwardTimer = new Timer(100);
         this._lastKeyDownTime = 0;
         this._pb.enabled = true;
         this._pb.setMode(ControlBarConstant.PROGRESSBAR_MODE_NORMAL);
         this._sound.enabled = true;
         this._miniSound.enabled = true;
         this._playButton.visible = true;
         this._pauseButton.visible = false;
         this._teleplaysButton.visible = false;
         this._nextButton.visible = false;
         this._loopButton.visible = false;
         this._shareButton.visible = false;
         this._fullScreenButton.visible = true;
         this._normalScreenButton.visible = false;
         this._voiceSelector.visible = false;
         this._qualitySelector.visible = false;
         this._threedButton.visible = false;
         this._captionButton.visible = false;
         this._rotateButton.visible = false;
         this._miniPauseButton.visible = false;
         this._miniPlayButton.visible = false;
         this._miniSound.visible = false;
         this._logo.visible = false;
         this._informationBar.hide();
         var _loc1_:Boolean = this._playerProxy.fsoProxy.getMute();
         if(this._playerProxy.rootGetData.rootIsMute)
         {
            _loc1_ = true;
         }
         var _loc2_:Number = this._playerProxy.fsoProxy.getVolume();
         this._sound.data = _loc2_;
         this._sound.mute = _loc1_;
         this._miniSound.data = _loc2_;
         this._miniSound.mute = _loc1_;
         PlayerContext.volume = _loc2_;
         this._buttonInfo = new ButtonInfo();
         this._buttonInfo.visible = false;
         this._panel.addChild(this._buttonInfo);
         this._buttonInfoDict = new Dictionary();
         this._buttonInfoDict[this._playButton] = "播放";
         this._buttonInfoDict[this._pauseButton] = "暂停";
         this._buttonInfoDict[this._settingButton] = "设置";
         this._buttonInfoDict[this._shareButton] = "分享";
         this._buttonInfoDict[this._fullScreenButton] = "全屏";
         this._buttonInfoDict[this._normalScreenButton] = "退出全屏";
         this._buttonInfoDict[this._teleplaysButton] = "选集";
         this._buttonInfoDict[this._nextButton] = "下一个";
         this._buttonInfoDict[this._qualitySelector] = "清晰度";
         this._buttonInfoDict[this._loopButton] = "单曲循环";
         this._buttonInfoDict[this._threedButton] = "3D设置";
         this._buttonInfoDict[this._voiceSelector] = "语音设置";
         this._buttonInfoDict[this._logo] = "返回优酷观看";
         this._buttonInfoDict[this._captionButton] = "字幕设置";
         this._buttonInfoDict[this._rotateButton] = "画面旋转";
         this._buttonInfoTimer = new Timer(2 * 1000,1);
         this.layoutItem();
      }
      
      private function registerTips() : void {
         this._playerProxy.dispatchEvent(new PluginEvent(PluginEvent.TIPS_REGISTER,
            {
               "key":"loop",
               "text":"点击这里可以单曲循环"
            }));
         this._playerProxy.dispatchEvent(new PluginEvent(PluginEvent.TIPS_REGISTER,
            {
               "key":"lang",
               "text":"点击这里可以切换语言版本"
            }));
         this._playerProxy.dispatchEvent(new PluginEvent(PluginEvent.TIPS_REGISTER,
            {
               "key":"rotate",
               "text":"点击这里可以旋转画面"
            }));
      }
      
      public function setBackground(param1:Number, param2:Number, param3:Number = 1, param4:Boolean = true) : void {
         if(!(this._background == null) && (this._panel.contains(this._background)))
         {
            this._panel.removeChild(this._background);
         }
         this._background = new ControlBarBG(param1,param2,param3,param4);
         this._background.width = this._width;
         this._panel.addChildAt(this._background,0);
      }
      
      private function layoutItem() : void {
         this._panel.scaleX = this._panel.scaleY = this._scale;
         this._panel.y = this._height - this._background.height;
         this._upperParts.y = 0;
         this._lowerParts.y = 0;
         this._logo.x = this._background.width - this._logo.width;
         this._miniPauseButton.x = this._miniPlayButton.x = 10;
         var _loc1_:Number = 0;
         var _loc2_:Number = 0;
         if((this._miniPauseButton.visible) || (this._miniPlayButton.visible))
         {
            _loc1_ = this._miniPlayButton.x + this._miniPlayButton.width + 10;
            _loc2_ = 8;
         }
         this._pb.x = _loc1_;
         this._pb.y = _loc2_;
         this._miniSound.x = this._background.width - 28;
         this._miniSound.y = 0;
         var _loc3_:Sprite = this._background;
         this._playButton.x = 0;
         this._pauseButton.x = this._playButton.x;
         this._playMc.x = this._playButton.x + 3;
         _loc3_ = this._playButton;
         this._nextButton.x = this._playButton.x + this._playButton.width;
         if(this._nextButton.visible)
         {
            _loc3_ = this._nextButton;
         }
         else
         {
            _loc3_ = this._playButton;
         }
         this._timeDisplayer.x = _loc3_.x + _loc3_.width;
         if(this._timeDisplayer.visible)
         {
            _loc3_ = this._timeDisplayer;
         }
         var _loc4_:Number = this._logo.visible?this._logo.width:0;
         _loc3_ = this._background;
         LayoutHelper.align(this._background,this._fullScreenButton,"right",_loc4_);
         LayoutHelper.align(this._background,this._normalScreenButton,"right",_loc4_);
         if((this._fullScreenButton.visible) || (this._normalScreenButton.visible))
         {
            _loc3_ = this._fullScreenButton;
         }
         LayoutHelper.position(_loc3_,this._settingButton,"left",0);
         if(this._settingButton.visible)
         {
            _loc3_ = this._settingButton;
         }
         LayoutHelper.position(_loc3_,this._shareButton,"left",0);
         if(this._shareButton.visible)
         {
            _loc3_ = this._shareButton;
         }
         LayoutHelper.position(_loc3_,this._qualitySelector,"left",0);
         if(this._qualitySelector.visible)
         {
            _loc3_ = this._qualitySelector;
         }
         LayoutHelper.position(_loc3_,this._voiceSelector,"left",0);
         if(this._voiceSelector.visible)
         {
            _loc3_ = this._voiceSelector;
         }
         LayoutHelper.position(_loc3_,this._teleplaysButton,"left",0);
         if(this._teleplaysButton.visible)
         {
            _loc3_ = this._teleplaysButton;
         }
         LayoutHelper.position(_loc3_,this._captionButton,"left",0);
         if(this._captionButton.visible)
         {
            _loc3_ = this._captionButton;
         }
         LayoutHelper.position(_loc3_,this._threedButton,"left",0);
         if(this._threedButton.visible)
         {
            _loc3_ = this._threedButton;
         }
         LayoutHelper.position(_loc3_,this._rotateButton,"left",0);
         if(this._rotateButton.visible)
         {
            _loc3_ = this._rotateButton;
         }
         LayoutHelper.position(_loc3_,this._loopButton,"left",0);
         if(this._loopButton.visible)
         {
            _loc3_ = this._loopButton;
         }
         if(_loc3_ == this._background)
         {
            LayoutHelper.align(this._background,this._sound,"right",_loc4_);
         }
         else
         {
            LayoutHelper.position(_loc3_,this._sound,"left",0);
         }
         this._informationBar.x = 0;
         this._informationBar.y = this._background.y - this._informationBar.height;
         var _loc5_:Point = this._loopButton.localToGlobal(new Point(this._loopButton.width / 2,0));
         this._playerProxy.dispatchEvent(new PluginEvent(PluginEvent.TIPS_CHANGE_SIZE,
            {
               "key":"loop",
               "point":_loc5_,
               "playerWidth":this._width * this._scale
            }));
         _loc5_ = this._voiceSelector.localToGlobal(new Point(this._voiceSelector.width / 2,0));
         this._playerProxy.dispatchEvent(new PluginEvent(PluginEvent.TIPS_CHANGE_SIZE,
            {
               "key":"lang",
               "point":_loc5_,
               "playerWidth":this._width * this._scale
            }));
         _loc5_ = this._rotateButton.localToGlobal(new Point(this._rotateButton.width / 2,0));
         this._playerProxy.dispatchEvent(new PluginEvent(PluginEvent.TIPS_CHANGE_SIZE,
            {
               "key":"rotate",
               "point":_loc5_,
               "playerWidth":this._width * this._scale
            }));
      }
      
      public function showInformation(param1:String, param2:Boolean = false, param3:Object = null) : void {
         if(param2)
         {
            this._informationBar.changeType(param1,param3);
         }
         else
         {
            this._informationBar.appendTypeToShow(param1);
         }
         this._informationBar.show();
      }
      
      public function hideInformation() : void {
         this._informationBar.hide();
      }
      
      public function removeInformation() : void {
         this._panel.removeChild(this._informationBar);
         this._informationBar.visible = false;
      }
      
      public function removeProgressBarPoint() : void {
         this._pb.hideAllPoint();
      }
      
      public function toggleFullscreen(param1:Boolean) : void {
         this._fullscreen = param1;
         this._fullScreenButton.visible = !param1;
         this._normalScreenButton.visible = param1;
         this.layoutItem();
         if(param1)
         {
            this._autoHide = true;
            this._hideHeight = 0;
         }
         else if(this._hideMode == "yes")
         {
            this._autoHide = true;
            this._hideHeight = 0;
         }
         else if(this._hideMode == "half")
         {
            this._autoHide = true;
            this._hideHeight = this._pb.height + 8;
         }
         else
         {
            this._autoHide = false;
            this._hideHeight = 0;
         }
         
         
         this._sendHeightChanged = true;
         this.addMouseOnBarEvent(param1);
      }
      
      private function addMouseOnBarEvent(param1:Boolean) : void {
         if(param1)
         {
            this.addEventListener(MouseEvent.ROLL_OVER,this.barMouseOver);
            this.addEventListener(MouseEvent.ROLL_OUT,this.barMouseOut);
         }
         else
         {
            this.removeEventListener(MouseEvent.ROLL_OVER,this.barMouseOver);
            this.removeEventListener(MouseEvent.ROLL_OUT,this.barMouseOut);
         }
      }
      
      private function barMouseOut(param1:MouseEvent) : void {
         this._isMouseOnBar = false;
      }
      
      private function barMouseOver(param1:MouseEvent) : void {
         this._isMouseOnBar = true;
      }
      
      private function addEvents() : void {
         this._pb.addEventListener(ProgressBarEvent.DRAG_BEGIN,this.onPBDragBegin);
         this._pb.addEventListener(ProgressBarEvent.DRAGGING,this.onPBDragging);
         this._pb.addEventListener(ProgressBarEvent.DRAG_FINISH,this.onPBDragFinish);
         this._backwardTimer.addEventListener(TimerEvent.TIMER,this.onBackWardTimer);
         this._forwardTimer.addEventListener(TimerEvent.TIMER,this.onForWardTimer);
         this._sound.addEventListener(SoundSliderEvent.CHANGED,this.onSoundChanged);
         this._sound.addEventListener(SoundSliderEvent.MUTE_CHANGED,this.onMuteChanged);
         this._miniSound.addEventListener(SoundSliderEvent.CHANGED,this.onSoundChanged);
         this._miniSound.addEventListener(SoundSliderEvent.MUTE_CHANGED,this.onMuteChanged);
         this._miniPauseButton.addEventListener(MouseEvent.CLICK,this.onPauseButtonMouseClick);
         this._miniPlayButton.addEventListener(MouseEvent.CLICK,this.onPlayButtonMouseClick);
         this._playButton.addEventListener(MouseEvent.CLICK,this.onPlayButtonMouseClick);
         this._pauseButton.addEventListener(MouseEvent.CLICK,this.onPauseButtonMouseClick);
         this._fullScreenButton.addEventListener(MouseEvent.CLICK,this.onFullScreenClick);
         this._normalScreenButton.addEventListener(MouseEvent.CLICK,this.onFullScreenClick);
         this._settingButton.addEventListener(MouseEvent.CLICK,this.onSettingClick);
         this._shareButton.addEventListener(MouseEvent.CLICK,this.onShareClick);
         this._qualitySelector.addEventListener(MouseEvent.CLICK,this.onQualityClick);
         this._voiceSelector.addEventListener(MouseEvent.CLICK,this.onVoiceClick);
         this.addEventListener(Event.ENTER_FRAME,this.onThisEnterFrame);
         this._teleplaysButton.addEventListener(MouseEvent.CLICK,this.onListButtonClick);
         this._nextButton.addEventListener(MouseEvent.CLICK,this.onNextVideoButtonClick);
         this._informationBar.addEventListener(InformationBarEvent.SETTING_CLICK,this.onInformationSettingClick);
         this._informationBar.addEventListener(InformationBarEvent.QUALITY_CLICK,this.onInformationSettingClick);
         this._informationBar.addEventListener(InformationBarEvent.SEEK_TO_BEGIN_CLICK,this.onInformationSettingClick);
         this._informationBar.addEventListener(InformationBarEvent.SWITCH_TO_LOW_CLICK,this.onInformationSettingClick);
         this._informationBar.addEventListener(InformationBarEvent.INSTALL_IKU_CLICK,this.onInformationSettingClick);
         this._informationBar.addEventListener(InformationBarEvent.INTERNET_SLOW_CLICK,this.onInformationSettingClick);
         this._informationBar.addEventListener(InformationBarEvent.INTERNET_ACCELERATE_CLICK,this.onInformationSettingClick);
         this._informationBar.addEventListener(InformationBarEvent.BUY_CLICK,this.onInformationSettingClick);
         this._informationBar.addEventListener(InformationBarEvent.COPY_LINK_CLICK,this.onInformationSettingClick);
         this._informationBar.addEventListener(InformationBarEvent.VERIFY_USER_CLICK,this.onInformationSettingClick);
         this._informationBar.addEventListener(InformationBarEvent.AD_SHARE_CLICK,this.onInformationSettingClick);
         this._informationBar.addEventListener(InformationBarEvent.BAR_SHOW,this.onInformationVisible);
         this._informationBar.addEventListener(InformationBarEvent.BAR_HIDE,this.onInformationVisible);
         this._logo.addEventListener(MouseEvent.CLICK,this.onLogoClick);
         this._captionButton.addEventListener(MouseEvent.CLICK,this.onCaptionButtonClick);
         this._threedButton.addEventListener(MouseEvent.CLICK,this.onThreedButtonClick);
         this._rotateButton.addEventListener(MouseEvent.CLICK,this.onRotateButtonClick);
         this._loopButton.addEventListener(MouseEvent.CLICK,this.onLoopButtonClick);
         stage.addEventListener(KeyboardEvent.KEY_DOWN,this.onKeyDown);
         this._playerProxy.addEventListener(MouseEvent.MOUSE_MOVE,this.onMouseMove);
         this._playerProxy.addEventListener(Event.MOUSE_LEAVE,this.onMouseLeave);
         this._playButton.addEventListener(MouseEvent.ROLL_OVER,this.onButtonRollOver);
         this._pauseButton.addEventListener(MouseEvent.ROLL_OVER,this.onButtonRollOver);
         this._settingButton.addEventListener(MouseEvent.ROLL_OVER,this.onButtonRollOver);
         this._shareButton.addEventListener(MouseEvent.ROLL_OVER,this.onButtonRollOver);
         this._fullScreenButton.addEventListener(MouseEvent.ROLL_OVER,this.onButtonRollOver);
         this._normalScreenButton.addEventListener(MouseEvent.ROLL_OVER,this.onButtonRollOver);
         this._teleplaysButton.addEventListener(MouseEvent.ROLL_OVER,this.onButtonRollOver);
         this._nextButton.addEventListener(MouseEvent.ROLL_OVER,this.onButtonRollOver);
         this._qualitySelector.addEventListener(MouseEvent.ROLL_OVER,this.onButtonRollOver);
         this._loopButton.addEventListener(MouseEvent.ROLL_OVER,this.onButtonRollOver);
         this._threedButton.addEventListener(MouseEvent.ROLL_OVER,this.onButtonRollOver);
         this._rotateButton.addEventListener(MouseEvent.ROLL_OVER,this.onButtonRollOver);
         this._sound.addEventListener(MouseEvent.ROLL_OVER,this.onButtonRollOver);
         this._voiceSelector.addEventListener(MouseEvent.ROLL_OVER,this.onButtonRollOver);
         this._logo.addEventListener(MouseEvent.ROLL_OVER,this.onButtonRollOver);
         this._captionButton.addEventListener(MouseEvent.ROLL_OVER,this.onButtonRollOver);
         this._playButton.addEventListener(MouseEvent.ROLL_OUT,this.onButtonRollOut);
         this._pauseButton.addEventListener(MouseEvent.ROLL_OUT,this.onButtonRollOut);
         this._settingButton.addEventListener(MouseEvent.ROLL_OUT,this.onButtonRollOut);
         this._shareButton.addEventListener(MouseEvent.ROLL_OUT,this.onButtonRollOut);
         this._fullScreenButton.addEventListener(MouseEvent.ROLL_OUT,this.onButtonRollOut);
         this._normalScreenButton.addEventListener(MouseEvent.ROLL_OUT,this.onButtonRollOut);
         this._teleplaysButton.addEventListener(MouseEvent.ROLL_OUT,this.onButtonRollOut);
         this._nextButton.addEventListener(MouseEvent.ROLL_OUT,this.onButtonRollOut);
         this._qualitySelector.addEventListener(MouseEvent.ROLL_OUT,this.onButtonRollOut);
         this._loopButton.addEventListener(MouseEvent.ROLL_OUT,this.onButtonRollOut);
         this._threedButton.addEventListener(MouseEvent.ROLL_OUT,this.onButtonRollOut);
         this._rotateButton.addEventListener(MouseEvent.ROLL_OUT,this.onButtonRollOut);
         this._sound.addEventListener(MouseEvent.ROLL_OUT,this.onButtonRollOut);
         this._voiceSelector.addEventListener(MouseEvent.ROLL_OUT,this.onButtonRollOut);
         this._logo.addEventListener(MouseEvent.ROLL_OUT,this.onButtonRollOut);
         this._captionButton.addEventListener(MouseEvent.ROLL_OUT,this.onButtonRollOut);
         this._buttonInfoTimer.addEventListener(TimerEvent.TIMER_COMPLETE,this.onButtonInfoTimeout);
      }
      
      private function onShareClick(param1:MouseEvent) : void {
         ReportUtil.sendUserActionLog(ReportUtil.CONTROL_BAR_SHARE_CLICK);
         this._playerProxy.dispatchEvent(new PluginEvent(PluginEvent.CONTROL_SHARE));
      }
      
      private function onButtonRollOut(param1:MouseEvent) : void {
         this._buttonInfo.visible = false;
         this._buttonInfoTimer.stop();
      }
      
      private function onButtonInfoTimeout(param1:TimerEvent) : void {
         this._buttonInfo.visible = false;
         this._buttonInfoTimer.stop();
      }
      
      private function onButtonRollOver(param1:MouseEvent) : void {
         var _loc2_:String = this._buttonInfoDict[param1.target];
         if(!_loc2_)
         {
            return;
         }
         var _loc3_:Number = param1.target.x + param1.target.width / 2;
         var _loc4_:Number = -1;
         this._buttonInfo.setData(_loc2_,this._width,_loc3_);
         this._buttonInfo.x = _loc3_;
         this._buttonInfo.y = _loc4_;
         this._buttonInfo.visible = true;
         this._buttonInfoTimer.delay = 2 * 1000;
         this._buttonInfoTimer.reset();
         this._buttonInfoTimer.start();
      }
      
      private function onAddToStage(param1:Event) : void {
         removeEventListener(Event.ADDED_TO_STAGE,this.onAddToStage);
         if(stage)
         {
            stage.addEventListener(KeyboardEvent.KEY_DOWN,this.onKeyDown);
         }
      }
      
      private function onKeyDown(param1:KeyboardEvent) : void {
         if(param1.keyCode == Keyboard.SPACE)
         {
            if((this._playButton.enabled) || (this._pauseButton.enabled))
            {
               if(this._isPlaying)
               {
                  ReportUtil.sendUserActionLog(ReportUtil.PAUSE,ReportUtil.METHOD_KEYBOARD);
               }
               else
               {
                  ReportUtil.sendUserActionLog(ReportUtil.PLAY,ReportUtil.METHOD_KEYBOARD);
               }
               this.playPause();
            }
            return;
         }
         var _loc2_:* = true;
         switch(param1.keyCode)
         {
            case Keyboard.UP:
            case Keyboard.NUMPAD_ADD:
               if(this._sound.enabled)
               {
                  this._sound.increase(true);
                  this._miniSound.increase(false);
                  ReportUtil.sendUserActionLog(ReportUtil.VOLUMN_CONTROL_KEYBOARD_UP_DOWN,ReportUtil.METHOD_KEYBOARD);
               }
               break;
            case Keyboard.DOWN:
            case Keyboard.NUMPAD_SUBTRACT:
               if(this._sound.enabled)
               {
                  this._sound.decrease(true);
                  this._miniSound.decrease(false);
                  ReportUtil.sendUserActionLog(ReportUtil.VOLUMN_CONTROL_KEYBOARD_UP_DOWN,ReportUtil.METHOD_KEYBOARD);
               }
               break;
            case Keyboard.RIGHT:
               if(this._pb.enabled)
               {
                  if(getTimer() - this._lastKeyDownTime > 300)
                  {
                     this.onForwardButtonClick();
                     this._lastKeyDownTime = getTimer();
                  }
               }
               break;
            case Keyboard.LEFT:
               if(this._pb.enabled)
               {
                  if(getTimer() - this._lastKeyDownTime > 300)
                  {
                     this.onBackButtonClick();
                     this._lastKeyDownTime = getTimer();
                  }
               }
               break;
            default:
               _loc2_ = false;
         }
      }
      
      private function onPBDragBegin(param1:ProgressBarEvent) : void {
         this._holding = true;
         this.onDragSend(VideoBarEvent.DRAG_BEGIN,param1.data.time);
      }
      
      private function onPBDragging(param1:ProgressBarEvent) : void {
         this._holding = true;
         this.onDragSend(VideoBarEvent.DRAGGING,param1.data.time);
      }
      
      private function onPBDragFinish(param1:ProgressBarEvent) : void {
         this._holding = false;
         this.onDragSend(VideoBarEvent.DRAG_FINISHED,param1.data.time);
      }
      
      private function onSoundChanging(param1:SoundSliderEvent) : void {
         var _loc2_:VideoBarEvent = new VideoBarEvent(VideoBarEvent.SOUND_CHANGING,
            {
               "volume":param1.volume,
               "record":param1.record
            });
         this.dispatchEvent(_loc2_);
         _loc2_ = null;
      }
      
      private function onSoundChanged(param1:SoundSliderEvent) : void {
         var _loc2_:VideoBarEvent = new VideoBarEvent(VideoBarEvent.SOUND_CHANGED,
            {
               "volume":param1.volume,
               "record":param1.record,
               "userAction":param1.userAction
            });
         this.dispatchEvent(_loc2_);
         if(this._type == ControlBarConstant.CONTROLBAR_TYPE_NORMAL)
         {
            this._miniSound.data = param1.volume;
         }
         else
         {
            this._sound.data = param1.volume;
         }
         var _loc3_:* = "音量 ";
         if(param1.volume == 1)
         {
            if(this._lastVolume <= param1.volume)
            {
               _loc3_ = "按方向键 ↑ 继续放大音量";
            }
         }
         this._lastVolume = param1.volume;
         this._buttonInfoDict[this._sound] = _loc3_;
         if(!this._isVolumeTipsFirstShow)
         {
            this._isVolumeTipsFirstShow = true;
            return;
         }
      }
      
      private function onMuteChanged(param1:SoundSliderEvent) : void {
         var _loc2_:VideoBarEvent = new VideoBarEvent(VideoBarEvent.MUTE_CHANGED,{"mute":param1.mute});
         this.dispatchEvent(_loc2_);
      }
      
      private function onForwardButtonClick(param1:MouseEvent = null) : void {
         ReportUtil.sendUserActionLog(ReportUtil.FAST_FORWARD,ReportUtil.METHOD_KEYBOARD,
            {
               "tb":this._pb.timeOnBar,
               "to":this._pb.timeOnBar + this.stepTime
            });
         dispatchEvent(new VideoBarEvent(VideoBarEvent.FORWARD_CLICK));
      }
      
      private function onBackButtonClick(param1:MouseEvent = null) : void {
         ReportUtil.sendUserActionLog(ReportUtil.FAST_BACKWORD,ReportUtil.METHOD_KEYBOARD,
            {
               "tb":this._pb.timeOnBar,
               "to":this._pb.timeOnBar - this.stepTime
            });
         dispatchEvent(new VideoBarEvent(VideoBarEvent.BACKWWARD_CLICK));
      }
      
      private function onForwardButtonUp(param1:Boolean = true) : void {
         this._holding = false;
         this._pb.hoding = false;
         this._forwardTimer.stop();
         if(param1)
         {
            this.onDragSend(VideoBarEvent.DRAG_FINISHED,this._draggingTime);
            this._pb.timeOnBar = this._draggingTime;
         }
      }
      
      private function onBackButtonEvent(param1:MouseEvent = null) : void {
         switch(param1.type)
         {
            case MouseEvent.MOUSE_DOWN:
               this._holding = true;
               this._pb.hoding = true;
               this._draggingTime = this._pb.timeOnBar;
               this._draggingTime = this._draggingTime - this.stepTime;
               this.onDragSend(VideoBarEvent.DRAG_BEGIN,this._draggingTime);
               this._pb.timeOnBar = this._draggingTime;
               this._pb.hoding = true;
               this._backwardTimer.reset();
               this._backwardTimer.start();
               break;
            case MouseEvent.MOUSE_UP:
               this._holding = false;
               this._pb.hoding = false;
               ReportUtil.sendUserActionLog(ReportUtil.FAST_BACKWORD,ReportUtil.METHOD_LEFT_CLICK,
                  {
                     "tb":this._pb.timeOnBar,
                     "to":this._draggingTime
                  });
               this.onDragSend(VideoBarEvent.DRAG_FINISHED,this._draggingTime);
               this._pb.timeOnBar = this._draggingTime;
               this._backwardTimer.stop();
               break;
         }
      }
      
      private function onForWardTimer(param1:TimerEvent) : void {
         this._holding = true;
         this._draggingTime = this._draggingTime + this.stepTime;
         this.onDragSend(VideoBarEvent.DRAGGING,this._draggingTime);
         this._pb.timeOnBar = this._draggingTime;
      }
      
      private function onBackWardTimer(param1:TimerEvent) : void {
         this._holding = true;
         this._draggingTime = this._draggingTime - this.stepTime;
         this.onDragSend(VideoBarEvent.DRAGGING,this._draggingTime);
         this._pb.timeOnBar = this._draggingTime;
      }
      
      private function onDragSend(param1:String, param2:Number) : void {
         var _loc3_:VideoBarEvent = null;
         if(!(param1 == VideoBarEvent.DRAG_BEGIN) && !(param1 == VideoBarEvent.DRAGGING) && !(param1 == VideoBarEvent.DRAG_FINISHED))
         {
            return;
         }
         if(param2 < 0)
         {
            param2 = 0;
         }
         if(param2 > this._totalTime)
         {
            param2 = this._totalTime;
         }
         _loc3_ = new VideoBarEvent(param1,{"time":param2});
         this.dispatchEvent(_loc3_);
         this._timeDisplayer.setTimeText(param2,this._totalTime);
      }
      
      public function playPause() : void {
         this._isPlaying = !this._isPlaying;
         this._playButton.visible = !this._isPlaying;
         this._pauseButton.visible = this._isPlaying;
         this.setPlayMc();
         this.trytoShowSmallButton();
         var _loc1_:VideoBarEvent = new VideoBarEvent(VideoBarEvent.PLAY_PAUSE,{"pause":!this._isPlaying});
         this.dispatchEvent(_loc1_);
      }
      
      private function setPlayMc() : void {
         var _loc1_:String = this._isPlaying?"play":"pause";
         if(this._playMcFrame == _loc1_)
         {
            return;
         }
         this._playMcFrame = _loc1_;
         this._playMc.gotoAndPlay(_loc1_);
      }
      
      private function trytoShowSmallButton() : void {
         if(this._type == ControlBarConstant.CONTROLBAR_TYPE_SMALL)
         {
            this._miniPauseButton.visible = this._isPlaying;
            this._miniPlayButton.visible = !this._isPlaying;
         }
         else
         {
            this._miniPauseButton.visible = this._miniPlayButton.visible = false;
         }
      }
      
      private function onPlayButtonMouseClick(param1:MouseEvent) : void {
         this._isPlaying = true;
         this._playButton.visible = !this._isPlaying;
         this._pauseButton.visible = this._isPlaying;
         this.setPlayMc();
         this.trytoShowSmallButton();
         ReportUtil.sendUserActionLog(ReportUtil.PLAY,ReportUtil.METHOD_BUTTON_CLICK);
         var _loc2_:VideoBarEvent = new VideoBarEvent(VideoBarEvent.PLAY_PAUSE,{"pause":false});
         this.dispatchEvent(_loc2_);
      }
      
      private function onPauseButtonMouseClick(param1:MouseEvent) : void {
         this._isPlaying = false;
         this._playButton.visible = !this._isPlaying;
         this._pauseButton.visible = this._isPlaying;
         this.setPlayMc();
         this.trytoShowSmallButton();
         ReportUtil.sendUserActionLog(ReportUtil.PAUSE,ReportUtil.METHOD_BUTTON_CLICK);
         var _loc2_:VideoBarEvent = new VideoBarEvent(VideoBarEvent.PLAY_PAUSE,{"pause":true});
         this.dispatchEvent(_loc2_);
      }
      
      private function onFullScreenClick(param1:MouseEvent) : void {
         if(param1.currentTarget == this._fullScreenButton)
         {
            ReportUtil.sendUserActionLog(ReportUtil.ENTER_FULLSCREEN);
         }
         else if(param1.currentTarget == this._normalScreenButton)
         {
            ReportUtil.sendUserActionLog(ReportUtil.QUIT_FULLSCREEN);
         }
         
         dispatchEvent(new VideoBarEvent(VideoBarEvent.FULLSCREEN_CHANGED));
      }
      
      private function onModerSelect(param1:SelectEvent) : void {
         var _loc2_:VideoBarEvent = new VideoBarEvent(VideoBarEvent.MODE_CHANGED,{"mode":param1.data});
         this.dispatchEvent(_loc2_);
      }
      
      private function onSettingClick(param1:MouseEvent) : void {
         ReportUtil.sendUserActionLog(ReportUtil.SETTINGS_PANEL_BUTTON_CLICK);
         dispatchEvent(new VideoBarEvent(VideoBarEvent.SETTING_CLICK));
      }
      
      private function onQualityClick(param1:MouseEvent) : void {
         ReportUtil.sendUserActionLog(ReportUtil.QUALITY_BUTTON_CLICK);
         dispatchEvent(new VideoBarEvent(VideoBarEvent.QUALITY_CLICK));
      }
      
      private function onVoiceClick(param1:MouseEvent) : void {
         ReportUtil.sendUserActionLog(ReportUtil.VOICE_BUTTON_CLICK);
         dispatchEvent(new VideoBarEvent(VideoBarEvent.VOICE_CLICK));
      }
      
      private function onThisEnterFrame(param1:Event) : void {
         var _loc4_:* = NaN;
         if(this._sendHeightChanged)
         {
            _loc4_ = this._background.height;
            if(this._hideMode == "half")
            {
               _loc4_ = this._pb.height + 8;
            }
            else if(this._hideMode == "yes")
            {
               _loc4_ = 0;
            }
            
            dispatchEvent(new VideoBarEvent(VideoBarEvent.HEIGHT_CHANGED,
               {
                  "h":_loc4_,
                  "fullscreen":this._fullscreen
               }));
            this._sendHeightChanged = false;
         }
         if(this._autoHide)
         {
            if(getTimer() - this._mouseTime >= 1000 && !this._panelHidden && (this._videoBarShow) && !this._isMouseOnBar)
            {
               this._panelHidden = true;
               this.dispatchEvent(new VideoBarEvent(VideoBarEvent.BAR_START_HIDE));
               Tweener.to(this._panel,0.5,
                  {
                     "y":this._height - this._hideHeight + this._pb.height,
                     "onComplete":this.onHideComplete
                  });
            }
         }
         var _loc2_:Number = 0;
         if(this._playerProxy != null)
         {
            _loc2_ = this._playerProxy.playerData.videoLoadedTime;
         }
         var _loc3_:Number = this._totalTime == 0?0:_loc2_ / this._totalTime;
         if(_loc3_ > 0.95)
         {
            _loc3_ = Math.round(_loc2_) / this._totalTime;
         }
         this._pb.setLoadPercent(_loc3_);
      }
      
      private function onHideComplete() : void {
         this._videoBarShow = false;
         this._panelHidden = false;
         this._pb.setMode(ControlBarConstant.PROGRESSBAR_MODE_MINI_HIDE_BALL);
         this.dispatchEvent(new VideoBarEvent(VideoBarEvent.BAR_HIDE));
      }
      
      private function onMouseMove(param1:MouseEvent) : void {
         if(this._type == ControlBarConstant.CONTROLBAR_TYPE_SMALL)
         {
            return;
         }
         if(param1 != null)
         {
            if(stage)
            {
               if(stage.mouseY > this._height * 0.8)
               {
                  this._pb.setMode(ControlBarConstant.PROGRESSBAR_MODE_NORMAL);
                  this._isMouseOnProgressBar = true;
               }
               else if(this._pb.isShowingPreview == false)
               {
                  if(this._isForceProgressMode == false)
                  {
                     this._pb.setMode(ControlBarConstant.PROGRESSBAR_MODE_MINI_HIDE_BALL);
                  }
                  this._isMouseOnProgressBar = false;
               }
               
            }
         }
         if(!this._autoHide)
         {
            return;
         }
         if(!this._videoBarShow || (this._panelHidden))
         {
            this._videoBarShow = true;
            this._panelHidden = false;
            Tweener.to(this._panel,0.5,
               {
                  "y":this._height - this._background.height,
                  "onComplete":this.onShowComplete
               });
            this._pb.setMode(ControlBarConstant.PROGRESSBAR_MODE_NORMAL);
            dispatchEvent(new VideoBarEvent(VideoBarEvent.BAR_SHOW,this._background.height));
         }
         this._mouseTime = getTimer();
      }
      
      private function onMouseLeave(param1:Event) : void {
         if(this._type == ControlBarConstant.CONTROLBAR_TYPE_SMALL)
         {
            return;
         }
         if(this._isForceProgressMode == false)
         {
            this._pb.setMode(ControlBarConstant.PROGRESSBAR_MODE_MINI_HIDE_BALL);
         }
         this._isMouseOnProgressBar = false;
      }
      
      private function showControlbar() : void {
         Tweener.killTweensOf(this._panel);
         this._panel.visible = true;
         this._panel.y = this._height - this._background.height;
         this._videoBarShow = true;
         this._panelHidden = false;
         this._mouseTime = getTimer();
      }
      
      private function onShowComplete() : void {
         this._panel.filters = [];
      }
      
      private function onPreVideoButtonClick(param1:MouseEvent) : void {
         ReportUtil.sendUserActionLog(ReportUtil.PREVIOUS_VIDEO_CLICK);
         dispatchEvent(new VideoBarEvent(VideoBarEvent.PRE_VIDEO_CLICK));
      }
      
      private function onNextVideoButtonClick(param1:MouseEvent) : void {
         ReportUtil.sendUserActionLog(ReportUtil.NEXT_VIDEO_CLICK);
         dispatchEvent(new VideoBarEvent(VideoBarEvent.NEXT_VIDEO_CLICK));
      }
      
      private function onListButtonClick(param1:MouseEvent) : void {
         ReportUtil.sendUserActionLog(ReportUtil.OFFICIAL_LIST_ICON_CLICK);
         dispatchEvent(new VideoBarEvent(VideoBarEvent.PROGRAM_LIST_CLICK));
      }
      
      private function onCaptionButtonClick(param1:MouseEvent) : void {
         ReportUtil.sendUserActionLog(ReportUtil.CONTROL_BAR_CAPTION_CLICK);
         dispatchEvent(new VideoBarEvent(VideoBarEvent.CAPTION_CLICK));
      }
      
      private function onThreedButtonClick(param1:MouseEvent) : void {
         ReportUtil.sendUserActionLog(ReportUtil.CONTROL_BAR_THREED_CLICK);
         dispatchEvent(new VideoBarEvent(VideoBarEvent.THREED_CLICK));
      }
      
      private function onLoopButtonClick(param1:MouseEvent) : void {
         ReportUtil.sendUserActionLog(ReportUtil.CONTROL_BAR_LOOP_CLICK);
         var _loc2_:Boolean = this._loopButton.selected;
         dispatchEvent(new VideoBarEvent(VideoBarEvent.LOOP_CLICK,{"loop":_loc2_}));
      }
      
      private function onRotateButtonClick(param1:MouseEvent) : void {
         dispatchEvent(new VideoBarEvent(VideoBarEvent.ROTATE_CLICK,{"angle":90}));
         ReportUtil.sendUserActionLog(ReportUtil.CONTROL_BAR_ROTATE_CLICK);
      }
      
      private function onInformationSettingClick(param1:InformationBarEvent) : void {
         var _loc2_:String = null;
         var _loc3_:String = null;
         var _loc4_:String = null;
         var _loc5_:String = null;
         switch(param1.type)
         {
            case InformationBarEvent.SETTING_CLICK:
               dispatchEvent(new VideoBarEvent(VideoBarEvent.SETTING_CLICK));
               break;
            case InformationBarEvent.QUALITY_CLICK:
               dispatchEvent(new VideoBarEvent(VideoBarEvent.QUALITY_CLICK));
               break;
            case InformationBarEvent.SEEK_TO_BEGIN_CLICK:
               this.onDragSend(VideoBarEvent.DRAG_FINISHED,0);
               break;
            case InformationBarEvent.SWITCH_TO_LOW_CLICK:
               dispatchEvent(new VideoBarEvent(VideoBarEvent.SWITCH_TO_LOW));
               break;
            case InformationBarEvent.INSTALL_IKU_CLICK:
               OpenWindow.open(new URLRequest(PlayerConstant.IKU_INSTALL_LINK),"_blank");
               break;
            case InformationBarEvent.AD_SHARE_CLICK:
               OpenWindow.open(new URLRequest(PlayerConstant.AD_SHARE_LINK),"_blank");
               break;
            case InformationBarEvent.BUY_CLICK:
               dispatchEvent(new VideoBarEvent(VideoBarEvent.BUY_LINK_CLICK));
               return;
            case InformationBarEvent.COPY_LINK_CLICK:
               this.copyVideoLink();
               this.showInformation(ControlBarConstant.INFOBAR_OPEN_WINDOW_COPYIED,true);
               return;
            case InformationBarEvent.VERIFY_USER_CLICK:
               _loc2_ = "http://hz.youku.com/red/click.php?tp=1&cp=4008193&cpp=1000658&url=";
               _loc2_ = _loc2_ + PlayerConfig.playListData.verifyUser.home_url;
               OpenWindow.open(new URLRequest(_loc2_),"_blank");
               return;
            case InformationBarEvent.INTERNET_SLOW_CLICK:
               _loc3_ = "http://www.youku.com/service/feed/subtype/2/";
               _loc4_ = this._playerProxy.playerData.videoIdEncode;
               if(_loc4_ == null || _loc4_ == "")
               {
                  _loc4_ = this._playerProxy.rootGetData.rootVideoIdEncode;
               }
               _loc3_ = _loc3_ + ("?code=" + ErrorCode.INTERNET_SLOW);
               _loc3_ = _loc3_ + ("&videoID=" + _loc4_);
               _loc3_ = _loc3_ + ("&quality=" + "flv");
               _loc3_ = _loc3_ + ("&vs=" + this._playerProxy.playerData.videoNsTime);
               _loc3_ = _loc3_ + ("&vt=" + this._playerProxy.playerData.videoTitle);
               OpenWindow.openURL(_loc3_);
               return;
            case InformationBarEvent.INTERNET_ACCELERATE_CLICK:
               _loc5_ = "http://cps.youku.com/redirect.html?id=000053c9";
               this._playerProxy.dispatchEvent(new PlayerControlEvent(PlayerControlEvent.CORE_PAUSE,{"useraction":true}));
               OpenWindow.open(new URLRequest(_loc5_),"_blank");
               return;
         }
         this._informationBar.hide();
      }
      
      private function onInformationVisible(param1:InformationBarEvent) : void {
         switch(param1.type)
         {
            case InformationBarEvent.BAR_SHOW:
               this._playerProxy.dispatchEvent(new PluginEvent(PluginEvent.CONTROL_BAR_INFO_BAR_SHOW));
               break;
            case InformationBarEvent.BAR_HIDE:
               this._playerProxy.dispatchEvent(new PluginEvent(PluginEvent.CONTROL_BAR_INFO_BAR_HIDE));
               break;
         }
      }
      
      private function copyVideoLink() : void {
         var _loc1_:String = this._playerProxy.playerData.getVideoURL(false);
         try
         {
            System.setClipboard(_loc1_);
         }
         catch(e:Error)
         {
         }
      }
      
      private function onLogoClick(param1:MouseEvent) : void {
         ReportUtil.sendUserActionLog(ReportUtil.CONTROL_BAR_LOGO_CLICK);
         var _loc2_:VideoBarEvent = new VideoBarEvent(VideoBarEvent.LOGO_CLICK);
         this.dispatchEvent(_loc2_);
      }
      
      private function onBigPauseButtonClick(param1:MouseEvent) : void {
         this.showPause();
         ReportUtil.sendUserActionLog(ReportUtil.PLAY,ReportUtil.METHOD_FRAME_BUTTON_CLICK);
         var _loc2_:VideoBarEvent = new VideoBarEvent(VideoBarEvent.PLAY_PAUSE,{"pause":false});
         this.dispatchEvent(_loc2_);
      }
      
      public function reset() : void {
         this._isPlaying = false;
         this._showNextPre = false;
         this._showQuality = false;
         this._showVoice = false;
         this._showLogo = false;
         this._showShare = false;
         this._showCaption = false;
         this._showThreed = false;
         this._showRotate = false;
         this._showLoop = false;
         this._enableVideoControl = false;
         this._playButton.visible = !this._isPlaying;
         this._pauseButton.visible = this._isPlaying;
         this._playButton.enabled = false;
         this.setPlayMc();
         this.trytoShowSmallButton();
         this._informationBar.hide();
         this._pb.reset();
         this._pb.setLoadPercent(0);
         this.playPer = 0;
         this._pb.enabled = false;
         this._sound.enabled = false;
         this._miniSound.enabled = false;
         this._continuousHintShowed = false;
         this._jumpHeadShowed = false;
         this._jumpTailShowed = false;
         this._jumpedHead = false;
         this._jumpedTail = false;
         this._timeDisplayer.setTimeText(0,0);
      }
      
      public function setWH(param1:Number, param2:Number) : void {
         this._height = param2;
         this._scale = 1;
         this._width = param1;
         if((this._fullscreen) && param1 >= 1024)
         {
            this._scale = ControlBarConstant.CONTROLBAR_SCALE_RATIO;
            this._width = param1 / this._scale;
         }
         this.updateSize();
         this.layoutItem();
         this.showControlbar();
      }
      
      private function updateSize() : void {
         var _loc3_:* = NaN;
         var _loc4_:* = NaN;
         var _loc1_:String = this._type;
         if(this._fullscreen)
         {
            this._type = ControlBarConstant.CONTROLBAR_TYPE_NORMAL;
         }
         else if(this._width < 200 || this._height < 150 || this._playerProxy.rootGetData.rootWinType == "index" || this._playerProxy.rootGetData.rootWinType == "adshow")
         {
            this._type = ControlBarConstant.CONTROLBAR_TYPE_SMALL;
            this._playerProxy.dispatchEvent(new PluginEvent(PluginEvent.CONTROL_BAR_STATE_MINI));
         }
         else
         {
            this._type = ControlBarConstant.CONTROLBAR_TYPE_NORMAL;
         }
         
         if(!this._shouldShow)
         {
            this._type = ControlBarConstant.CONTROLBAR_TYPE_NONE;
         }
         this._background.width = this._width;
         this._informationBar.setSize(this._width,this._height);
         if(this._type == ControlBarConstant.CONTROLBAR_TYPE_NONE)
         {
            this._background.height = 0;
         }
         else if(this._type == ControlBarConstant.CONTROLBAR_TYPE_SMALL)
         {
            this.setBackground(ControlBarConstant.BG_NORMAL_COLOR,ControlBarConstant.BG_MINI_LINE_COLOR,1,false);
            this._background.height = 13;
            this._lowerParts.visible = false;
            this._logo.visible = false;
            this._pb.setMode(ControlBarConstant.PROGRESSBAR_MODE_MINI_SHOW_BALL,false);
            this._miniPlayButton.visible = !this._isPlaying;
            this._miniPauseButton.visible = this._isPlaying;
            if(this._width > 200)
            {
               this._miniSound.visible = true;
            }
            else
            {
               this._miniSound.visible = false;
            }
         }
         else if(this._type == ControlBarConstant.CONTROLBAR_TYPE_NORMAL)
         {
            this._background.height = 40 * this._scale;
            this._lowerParts.visible = true;
            this._miniPauseButton.visible = this._miniPlayButton.visible = false;
            this._miniSound.visible = false;
            this._logo.visible = false;
            this._teleplaysButton.visible = false;
            if(this._showLogo)
            {
               this._logo.visible = true;
            }
            if(this._showShare)
            {
               this._shareButton.visible = true;
            }
            if(this._showNextPre)
            {
               this._nextButton.visible = true;
               if(this._fullscreen)
               {
                  this._teleplaysButton.visible = true;
               }
            }
            this._timeDisplayer.visible = true;
            if(this._showLoop)
            {
               this._loopButton.visible = true;
            }
            this._sound.visible = true;
            if(this._showQuality)
            {
               this._qualitySelector.visible = true;
            }
            if(this._showVoice)
            {
               this._voiceSelector.visible = true;
            }
            if(this._showRotate)
            {
               this._rotateButton.visible = true;
            }
            this._captionButton.visible = this._showCaption;
            this._threedButton.visible = this._showThreed;
            this._settingButton.visible = true;
            this._fullScreenButton.visible = !this._fullscreen;
            this._normalScreenButton.visible = this._fullscreen;
            _loc3_ = 0;
            _loc3_ = _loc3_ + this._playButton.width;
            if(this._showNextPre)
            {
               _loc3_ = _loc3_ + (this._nextButton.width + this._teleplaysButton.width);
            }
            this._timeDisplayer.shortMode = false;
            _loc3_ = _loc3_ + this._timeDisplayer.width;
            if(this._showLoop)
            {
               _loc3_ = _loc3_ + this._loopButton.width;
            }
            _loc3_ = _loc3_ + this._sound.width;
            if(this._showQuality)
            {
               _loc3_ = _loc3_ + this._qualitySelector.width;
            }
            if(this._showVoice)
            {
               _loc3_ = _loc3_ + this._voiceSelector.width;
            }
            if(this._showCaption)
            {
               _loc3_ = _loc3_ + this._captionButton.width;
            }
            if(this._showThreed)
            {
               _loc3_ = _loc3_ + this._threedButton.width;
            }
            if(this._showRotate)
            {
               _loc3_ = _loc3_ + this._rotateButton.width;
            }
            if(this._showShare)
            {
               _loc3_ = _loc3_ + this._shareButton.width;
            }
            _loc3_ = _loc3_ + this._settingButton.width;
            _loc3_ = _loc3_ + this._fullScreenButton.width;
            _loc3_ = _loc3_ + 10;
            if(this._showLogo)
            {
               _loc3_ = _loc3_ + this._logo.width;
            }
            if(_loc3_ > this._width)
            {
               _loc4_ = this._timeDisplayer.width;
               this._timeDisplayer.shortMode = true;
               _loc3_ = _loc3_ - (_loc4_ - this._timeDisplayer.width);
            }
            if(_loc3_ > this._width && (this._showLoop))
            {
               _loc3_ = _loc3_ - this._loopButton.width;
               this._loopButton.visible = false;
               this._playerProxy.dispatchEvent(new PluginEvent(PluginEvent.TIPS_HIDE,{"key":"loop"}));
            }
            if(_loc3_ > this._width && (this._showRotate))
            {
               _loc3_ = _loc3_ - this._rotateButton.width;
               this._rotateButton.visible = false;
               this._playerProxy.dispatchEvent(new PluginEvent(PluginEvent.TIPS_HIDE,{"key":"rotate"}));
            }
            if(_loc3_ > this._width && (this._showThreed))
            {
               _loc3_ = _loc3_ - this._threedButton.width;
               this._threedButton.visible = false;
            }
            if(_loc3_ > this._width && (this._showCaption))
            {
               _loc3_ = _loc3_ - this._captionButton.width;
               this._captionButton.visible = false;
            }
            if(_loc3_ > this._width && (this._showNextPre))
            {
               _loc3_ = _loc3_ - this._nextButton.width;
               this._nextButton.visible = false;
            }
            if(_loc3_ > this._width && (this._showNextPre) && (this._fullscreen))
            {
               _loc3_ = _loc3_ - this._teleplaysButton.width;
               this._teleplaysButton.visible = false;
            }
            if(_loc3_ > this._width && (this._showVoice))
            {
               _loc3_ = _loc3_ - this._voiceSelector.width;
               this._voiceSelector.visible = false;
               this._playerProxy.dispatchEvent(new PluginEvent(PluginEvent.TIPS_HIDE,{"key":"lang"}));
            }
            if(_loc3_ > this._width)
            {
               _loc3_ = _loc3_ - this._settingButton.width;
               this._settingButton.visible = false;
            }
            if(_loc3_ > this._width && (this._showQuality))
            {
               _loc3_ = _loc3_ - this._qualitySelector.width;
               this._qualitySelector.visible = false;
            }
            if(_loc3_ > this._width && (this._showShare))
            {
               _loc3_ = _loc3_ - this._shareButton.width;
               this._shareButton.visible = false;
            }
            if(_loc3_ > this._width)
            {
               _loc3_ = _loc3_ - this._timeDisplayer.width;
               this._timeDisplayer.visible = false;
            }
            if(_loc3_ > this._width)
            {
               _loc3_ = _loc3_ - this._normalScreenButton.width;
               this._fullScreenButton.visible = false;
               this._normalScreenButton.visible = false;
            }
            if(_loc3_ > this._width)
            {
               _loc3_ = _loc3_ - this._sound.width;
               this._sound.visible = false;
            }
            if(_loc3_ > this._width && (this._showLogo))
            {
               _loc3_ = _loc3_ - this._logo.width;
               this._logo.visible = false;
            }
         }
         
         
         var _loc2_:Number = this._width;
         _loc2_ = _loc2_ - ((this._miniPauseButton.visible) || (this._miniPlayButton.visible)?this._miniPauseButton.width + 20:0);
         _loc2_ = _loc2_ - (this._miniSound.visible?this._miniPauseButton.width + 10:0);
         if(this._type == ControlBarConstant.CONTROLBAR_TYPE_SMALL && this._width < 200)
         {
            _loc2_ = _loc2_ - 10;
         }
         this._pb.width = _loc2_;
         if(_loc1_ != this._type)
         {
            this._sendHeightChanged = true;
         }
      }
      
      public function showBar(param1:Boolean) : void {
         if(param1)
         {
            this.visible = true;
            this._shouldShow = true;
         }
         else
         {
            this.visible = false;
            this._shouldShow = false;
         }
         this.updateSize();
         this.layoutItem();
      }
      
      public function trigge() : void {
         this.onMouseMove(null);
      }
      
      public function changeProgress(param1:Number, param2:Number) : void {
         if(param2 > this._totalTime)
         {
            param2 = this._totalTime;
         }
         this.playPer = this._totalTime == 0?0:param2 / this._totalTime;
         if(!this._holding)
         {
            this._timeDisplayer.setTimeText(param2,this._totalTime);
         }
         var _loc3_:Boolean = !(this._playerProxy == null) && !(this._playerProxy.playerData.videoListNextVideo == null);
         var _loc4_:* = this._playerProxy.rootGetData.rootWinType == "interior";
         var _loc5_:Boolean = PlayerContext.loopPlay;
         if((_loc3_) && (_loc4_) && !_loc5_ && !this._continuousHintShowed && param2 + CONTINUOUS_NOTICE_BEFORE_TIME > this._totalTime)
         {
            this._continuousHintShowed = true;
            this._informationBar.hide();
            if(this._playerProxy.playerData.isContinuous)
            {
               this._informationBar.changeType(ControlBarConstant.INFOBAR_CONTINUOUS_PLAY);
            }
            else
            {
               this._informationBar.changeType(ControlBarConstant.INFOBAR_CONTINUOUS_SETTING);
            }
            this._informationBar.show();
         }
      }
      
      public function set enableVideoControl(param1:Boolean) : void {
         this._enableVideoControl = param1;
         this.updateStatus(this._state);
      }
      
      public function showPlayOver() : void {
         this._isPlaying = false;
         this._playButton.visible = !this._isPlaying;
         this._pauseButton.visible = this._isPlaying;
         this._playButton.enabled = true;
         this.setPlayMc();
         this.trytoShowSmallButton();
         this._pb.setLoadPercent(1);
         this.playPer = 1;
         this._timeDisplayer.setTimeText(this._totalTime,this._totalTime);
      }
      
      public function showPause() : void {
         this._isPlaying = true;
         this.trytoShowSmallButton();
         this._playButton.visible = !this._isPlaying;
         this._pauseButton.visible = this._isPlaying;
         this.setPlayMc();
      }
      
      public function showPlay() : void {
         this._isPlaying = false;
         this.trytoShowSmallButton();
         this._playButton.visible = !this._isPlaying;
         this._pauseButton.visible = this._isPlaying;
         this.setPlayMc();
      }
      
      public function showReadyToPlay() : void {
         this._playButton.visible = true;
         this._pauseButton.visible = false;
         this._playButton.enabled = true;
         this.setPlayMc();
      }
      
      public function updateStatus(param1:String) : void {
         this._state = param1;
         this._pb.enabled = true && (this._enableVideoControl);
         this._pb.enablePreview = this._pb.enabled;
         this._playButton.enabled = true && (this._enableVideoControl);
         this._pauseButton.enabled = true && (this._enableVideoControl);
         this._fullScreenButton.enabled = true;
         this._normalScreenButton.enabled = true;
         this._loopButton.enabled = true;
         this._settingButton.enabled = true;
         this._shareButton.enabled = true;
         this._qualitySelector.enabled = true;
         this._voiceSelector.enabled = true;
         this._teleplaysButton.enabled = true;
         this._sound.enabled = true;
         this._threedButton.enabled = true;
         this._rotateButton.enabled = true;
         this._captionButton.enabled = true;
         switch(param1)
         {
            case ConductorState.INITIALIZE:
            case ConductorState.POST_VIDEO:
            case ConductorState.PRE_VIDEO:
            case ConductorState.READY_TO_PLAY:
               this._pb.enabled = false;
               this._pauseButton.enabled = false;
               this._settingButton.enabled = false;
               this._shareButton.enabled = false;
               this._qualitySelector.enabled = false;
               this._voiceSelector.enabled = false;
               this._threedButton.enabled = false;
               this._rotateButton.enabled = false;
               this._captionButton.enabled = false;
               this._playButton.enabled = false;
               this.onForwardButtonUp(false);
               if(param1 == ConductorState.READY_TO_PLAY)
               {
                  this._sound.sendSoundChangedEvent();
                  this.noticeNewItem();
               }
               this.hideInformation();
               break;
            case ConductorState.VIDEO_END:
               this._pb.enablePreview = false;
               this._settingButton.enabled = false;
               this._qualitySelector.enabled = false;
               this._voiceSelector.enabled = false;
               this._teleplaysButton.enabled = false;
               this._threedButton.enabled = false;
               this._rotateButton.enabled = false;
               this._captionButton.enabled = false;
               this.hideInformation();
               break;
            case ConductorState.AD:
               this._pb.enabled = false;
               this._playButton.enabled = false;
               this._pauseButton.enabled = false;
               this._settingButton.enabled = false;
               this._shareButton.enabled = false;
               this._qualitySelector.enabled = false;
               this._voiceSelector.enabled = false;
               this._threedButton.enabled = false;
               this._rotateButton.enabled = false;
               this._captionButton.enabled = false;
               break;
         }
         this.layoutItem();
         this.onMouseMove(null);
      }
      
      private function noticeNewItem() : void {
      }
      
      public function updateMetaData() : void {
         var _loc1_:IPlayerData = this._playerProxy.playerData;
         this._totalTime = _loc1_.playlistTotalTime;
         this._pb.totalTime = this._totalTime;
         this._timeDisplayer.setTimeText(0,this._totalTime);
         this._showQuality = true;
         this.selectQuality(_loc1_.playlistCurrentQuality);
         this._qualitySelector.visible = this._showQuality;
         this._showVoice = !(_loc1_.dvdinfo == null) && _loc1_.dvdinfo.audioLangs.length > 1;
         this._voiceSelector.visible = this._showVoice;
         this._voiceSelector.label = _loc1_.playlistCurrentLang;
         this._showLogo = this.shouldShowLogo();
         this._showShare = this.shouldShowShare();
         this._showLoop = this._playerProxy.rootGetData.rootShowLoop;
         this._loopButton.selected = this._playerProxy.fsoProxy.getLoopSetting();
         this._showCaption = false;
         this._showThreed = false;
         this._showRotate = false;
         this._teleplaysButton.visible = false;
         this._nextButton.visible = false;
         this._teleplaysButton.enabled = false;
         this._nextButton.enabled = false;
         if(!(!(this._playerProxy.rootGetData.rootWinType == "interior") || _loc1_.videoListPrograms.length <= 1))
         {
            this._showNextPre = true;
            if(_loc1_.videoListNextVideo != null)
            {
               this._nextButton.enabled = true;
            }
            if(_loc1_.videoListPreVideo != null)
            {
            }
            this._teleplaysButton.enabled = true;
         }
         this._pb.setHead(_loc1_.dvdinfo.headPostion);
         this._pb.setTail(_loc1_.dvdinfo.tailPostion);
         this._pb.setStoryPoint(_loc1_.dvdinfo.insertPoints);
         if(this._playerProxy.playerData.previews != null)
         {
            this._pb.isImagePreview = true;
            this._pb.previewer.initImagePreview(this._playerProxy.playerData.previews);
         }
         else
         {
            this._pb.isImagePreview = false;
         }
         if(this._playerProxy.playerData.circle == true)
         {
            this.showRotateButton();
         }
         this.updateSize();
         this.layoutItem();
      }
      
      public function setVolume(param1:Number) : void {
         this._miniSound.setDisplayData(param1);
         this._sound.setDisplayData(param1);
      }
      
      public function selectQuality(param1:String) : void {
         if(param1 == "hd3")
         {
            this._qualitySelector.label = "1080P";
         }
         else if(param1 == "hd2")
         {
            this._qualitySelector.label = "超清";
         }
         else if(param1 == "mp4")
         {
            this._qualitySelector.label = "高清";
         }
         else if(param1 == "flv" || param1 == "flvhd")
         {
            this._qualitySelector.label = "标清";
         }
         
         
         
      }
      
      public function get progressbar() : DisplayObject {
         return this._pb;
      }
      
      public function showThreedButton() : void {
         this._showThreed = true;
         this.updateSize();
         this.layoutItem();
      }
      
      public function showRotateButton() : void {
         this._showRotate = true;
         this.updateSize();
         this.layoutItem();
      }
      
      public function showCaptionButton() : void {
         this._showCaption = true;
         this.updateSize();
         this.layoutItem();
      }
      
      public function get stepTime() : int {
         var _loc1_:* = 20;
         if(this._playerProxy.playerData.videoTotalTime < 60)
         {
            _loc1_ = 10;
         }
         else if(this._playerProxy.playerData.videoTotalTime >= 60 && this._playerProxy.playerData.videoTotalTime < 60 * 3)
         {
            _loc1_ = 15;
         }
         else
         {
            _loc1_ = 20;
         }
         
         return _loc1_;
      }
      
      public function onVideoStartToPlay() : void {
         if(this._showLoop)
         {
            this._playerProxy.dispatchEvent(new PluginEvent(PluginEvent.TIPS_SHOW,{"key":"loop"}));
         }
         if(this._showVoice)
         {
            this._playerProxy.dispatchEvent(new PluginEvent(PluginEvent.TIPS_SHOW,{"key":"lang"}));
         }
         if(this._showRotate)
         {
            this._playerProxy.dispatchEvent(new PluginEvent(PluginEvent.TIPS_SHOW,{"key":"rotate"}));
         }
      }
      
      private function set playPer(param1:Number) : void {
         this._playPer = param1;
         this._pb.setPlayPercent(this._playPer);
         this._isForceProgressMode = true;
         var _loc2_:Number = this._totalTime * this._playPer;
         if(_loc2_ > 5 && _loc2_ < this._totalTime - 5)
         {
            this._isForceProgressMode = false;
         }
         if(this._type != ControlBarConstant.CONTROLBAR_TYPE_SMALL)
         {
            if(this._isForceProgressMode)
            {
               this._pb.setMode(ControlBarConstant.PROGRESSBAR_MODE_NORMAL);
            }
            else if(this._isMouseOnProgressBar == false)
            {
               this._pb.setMode(ControlBarConstant.PROGRESSBAR_MODE_MINI_HIDE_BALL);
            }
            
         }
      }
      
      public function setStyle(param1:String) : void {
         switch(param1)
         {
            case ControlBarConstant.CONTROLBAR_STYLE_LIGHT:
               if(this._divSkinType == 1)
               {
                  return;
               }
               this._fullScreenButton.setStyle("disabledSkin",AssetUtil.getAsset("C_FullScreen_disable"));
               this._normalScreenButton.setStyle("disabledSkin",AssetUtil.getAsset("C_NonfullScreen_disable"));
               this._playButton.setStyle("disabledSkin",AssetUtil.getAsset("C_Play_disable"));
               this._pauseButton.setStyle("disabledSkin",AssetUtil.getAsset("C_Pause_disable"));
               this._nextButton.setStyle("disabledSkin",AssetUtil.getAsset("C_Next_disable"));
               this._loopButton.setStyle("disabledSkin",AssetUtil.getAsset("C_SingleRepeat_disable"));
               this._rotateButton.setStyle("disabledSkin",AssetUtil.getAsset("C_rotate_icon_disable"));
               this._settingButton.setStyle("disabledSkin",AssetUtil.getAsset("C_SysSettings_disable"));
               this._shareButton.setStyle("disabledSkin",AssetUtil.getAsset("C4_Share_disable"));
               this._teleplaysButton.setStyle("disabledSkin",AssetUtil.getAsset("C_Text_btn_bg_disable"),ControlBarFont.FONT_QUALITY_DISABLE);
               this._voiceSelector.setStyle("disabledSkin",AssetUtil.getAsset("C_Text_btn_bg_disable"),ControlBarFont.FONT_QUALITY_DISABLE);
               this._qualitySelector.setStyle("disabledSkin",AssetUtil.getAsset("C_Text_btn_bg_disable"),ControlBarFont.FONT_QUALITY_DISABLE);
               this._captionButton.setStyle("disabledSkin",AssetUtil.getAsset("C_Text_btn_bg_disable"),ControlBarFont.FONT_QUALITY_DISABLE);
               this._threedButton.setStyle("disabledSkin",AssetUtil.getAsset("C_Text_btn_bg_disable"),ControlBarFont.FONT_QUALITY_DISABLE);
               this._timeDisplayer.setStyle(ControlBarConstant.CONTROLBAR_STYLE_LIGHT);
               this._background.setStyle(ControlBarConstant.CONTROLBAR_STYLE_LIGHT);
               break;
            case ControlBarConstant.CONTROLBAR_STYLE_DARK:
               this._fullScreenButton.setStyle("disabledSkin",AssetUtil.getAsset("C_FullScreen_disable_f"));
               this._normalScreenButton.setStyle("disabledSkin",AssetUtil.getAsset("C_NonfullScreen_disable_f"));
               this._playButton.setStyle("disabledSkin",AssetUtil.getAsset("C_Play_disable_f"));
               this._pauseButton.setStyle("disabledSkin",AssetUtil.getAsset("C_Pause_disable_f"));
               this._nextButton.setStyle("disabledSkin",AssetUtil.getAsset("C_Next_disable_f"));
               this._loopButton.setStyle("disabledSkin",AssetUtil.getAsset("C_SingleRepeat_disable_f"));
               this._rotateButton.setStyle("disabledSkin",AssetUtil.getAsset("C_rotate_icon_disable_f"));
               this._settingButton.setStyle("disabledSkin",AssetUtil.getAsset("C_SysSettings_disable_f"));
               this._shareButton.setStyle("disabledSkin",AssetUtil.getAsset("C4_Share_disable_f"));
               this._teleplaysButton.setStyle("disabledSkin",AssetUtil.getAsset("C_Text_btn_bg_disable_f"),ControlBarFont.FONT_QUALITY_DISABLE_F);
               this._voiceSelector.setStyle("disabledSkin",AssetUtil.getAsset("C_Text_btn_bg_disable_f"),ControlBarFont.FONT_QUALITY_DISABLE_F);
               this._qualitySelector.setStyle("disabledSkin",AssetUtil.getAsset("C_Text_btn_bg_disable_f"),ControlBarFont.FONT_QUALITY_DISABLE_F);
               this._captionButton.setStyle("disabledSkin",AssetUtil.getAsset("C_Text_btn_bg_disable_f"),ControlBarFont.FONT_QUALITY_DISABLE_F);
               this._threedButton.setStyle("disabledSkin",AssetUtil.getAsset("C_Text_btn_bg_disable_f"),ControlBarFont.FONT_QUALITY_DISABLE_F);
               this._timeDisplayer.setStyle(ControlBarConstant.CONTROLBAR_STYLE_DARK);
               this._background.setStyle(ControlBarConstant.CONTROLBAR_STYLE_DARK);
               break;
         }
      }
      
      public function upDateSkin() : void {
         if(PlayerConfig.rootData.styleid < 1)
         {
            return;
         }
         if(PlayerConfig.rootData.styleid == 1)
         {
            this._divSkinType = 1;
            this.setStyle(ControlBarConstant.CONTROLBAR_STYLE_DARK);
            return;
         }
         if(PlayerConfig.partnerData.skinData.status == 0 || !PlayerConfig.partnerData.skinData.isControllbarDiv)
         {
            return;
         }
         if(PlayerConfig.partnerData.skinData.controllbar_bg == 1)
         {
            this._divSkinType = 1;
            this.setStyle(ControlBarConstant.CONTROLBAR_STYLE_DARK);
         }
         else
         {
            this._divSkinType = 0;
         }
         this._playButton.filters = PartenerSkinManager.getFilters(PartenerSkinManager.CONTROLBAR_BTN);
         this._pauseButton.filters = PartenerSkinManager.getFilters(PartenerSkinManager.CONTROLBAR_BTN);
         this._playMc.visible = false;
      }
      
      public function clearSkin() : void {
         this._divSkinType = 0;
         this._playButton.filters = [];
         this._playMc.visible = true;
      }
   }
}
